package com.hutao.manage.controller;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import com.hutao.manage.interceptor.LoginSecurityInterceptor;

@Configuration
public class MyWebAppConfigure extends WebMvcConfigurerAdapter {

	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(new LoginSecurityInterceptor()).
		excludePathPatterns("/user/toLogin").excludePathPatterns("/upload/*").
	  	excludePathPatterns("/user/login").excludePathPatterns("/user/userLogin").
	  	excludePathPatterns("/medrecord/*Ajax*").excludePathPatterns("/medrecord/*ajax*").
	  	excludePathPatterns("/medical_record/ajax*").
	  	excludePathPatterns("/medical_record/getProgressNote").
	  	excludePathPatterns("/statis/*Ajax").
		excludePathPatterns("/statistics/*ajax*").
		excludePathPatterns("/page/index").
		excludePathPatterns("/csv/**").
		excludePathPatterns("/jca/**").
	  	excludePathPatterns("/baseinfo/ajax*").
	  	excludePathPatterns("/sync/**").
	  	excludePathPatterns("/dm/**").
	  	excludePathPatterns("/ex/**").
		excludePathPatterns("/pdf/**").
		excludePathPatterns("/raNrs2000/**").
		excludePathPatterns("/hz/**").
	  	addPathPatterns("/**");
		super.addInterceptors(registry);
	}

}
